{% extends 'layout.html' %}
{% load rbac %}

{% block content %}
    <div class="luffy-container">

        <div>
            <h2><caption>个人信息</caption></h2>
        </div>

        <div class="btn-group" style="margin: 5px 0">
            <a class="btn btn-primary" href="{% memory_url request 'user_edit' pk=user_object.id %}">
                <i class="fa fa-plus-square" aria-hidden="true"></i> 修改个人信息
            </a>
        </div>
        <table class="table table-bordered">
            <thead>
            <tr>
                <th>姓名</th>
                <td>{{ user_object.name }}</td>
            </tr>
            </thead>
            <tbody>
            <tr>
                <th scope="row">邮箱</th>
                <td>{{ user_object.email }}</td>
            </tr>
            <tr>
                <th scope="row">级别</th>
                <td>{{ user_object.level }}</td>
            </tr>
            <tr>
                <th scope="row">部门</th>
                <td>{{ user_object.depart }}</td>
            </tr>
            <tr>
                <th scope="row">手机</th>
                <td>{{ user_object.phone }}</td>
            </tr>
            <tr>
                <th scope="row">重置密码</th>
                <td><a href="{% memory_url request 'user_reset_pwd' pk=user_object.id %}">重置密码</a></td>
            </tr>
            </tbody>
        </table>

        <nav>
            <ul class="pagination">
                {{ pager.page_html|safe }}
            </ul>
        </nav>
    </div>
{% endblock %}